<%-- 
    Document   : content_myproduct
    Created on : Jan 1, 2012, 11:07:42 PM
    Author     : Ngoc Linh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div id="content-col">
    <h2 class="bid_header_title">Gian hàng sản phẩm - Trang cá nhân P2T Bid</h2>
    <div>
        <p class="quaity_report" id="product_list">Tổng số sản phẩm trong gian hàng: <span class="quantiy_bid">${requestScope.listCount}</span></p>
        <div class="option_view">
            <div class="search_pro fl">
                <form action="#" method="get">
                    <label for="search_name">Từ khóa</label>
                    <input id="search_name" name="search_name" type="text" />
                    <input type="submit" value="Tìm" />
                </form>
            </div>
            <div class="mem_paging fr">
                <ul class="fl">
                    <c:if test="${soTrang > 0}" >
                        <c:forEach begin="1" end="${soTrang}" var="i">
                            <c:url value="myproduct.do" var="myproduct_link">
                                <c:param name="page" value="${i}" />
                            </c:url>
                            <li><a href="${myproduct_link}" <c:if test="${page eq i}">class="selected"</c:if> >${i}</a></li>
                        </c:forEach>
                    </c:if>
                </ul>
            </div>
        </div>
        <div id="myproduct">
            <c:if test="${not empty requestScope.dsSanPham}">
                <c:forEach var="sp" items="${requestScope.dsSanPham}">
                    <div class="myproduct_item">
                        <div class="myproduct_img fl">
                            <a target="_blank" href="/DauGia/product.do?masp=${sp.maSanPham}">
                                <img src="/DauGia/${sp.hinhMoTa}" alt="" />
                            </a>
                        </div>
                        <div class="myproduct_info fr">
                            <a target="_blank" class="myproduct_name" href="/DauGia/product.do?masp=${sp.maSanPham}">${sp.tenSanPham}</a>
                            <c:url value="myproduct.do" var="delete_link">
                                <c:param name="delete" value="${sp.maSanPham}" />
                            </c:url>
                            <a href="${delete_link}" class="fuction_delete" title="Xóa sản phẩm này">Xóa</a>
                            <a target="_blank" href="/DauGia/product.do?masp=${sp.maSanPham}" class="fuction_viewhistory" title="Xem lịch sử đấu giá cho sản phẩm này">Xem đấu giá</a>
                            <table>
                                <tr>
                                    <td class="label">Ngày đăng</td>
                                    <td class="value"><fmt:formatDate pattern="dd/MM/yyyy" value="${sp.ngayDang}" /></td>
                                    <td class="label">Ngày hết hạn</td>
                                    <td class="value"><fmt:formatDate pattern="dd/MM/yyyy" value="${sp.ngayHetHan}" /></td>
                                </tr>
                                <tr>
                                    <td class="label">Giá khởi điểm</td>
                                    <td class="value"><fmt:formatNumber pattern="###,###" value="${sp.giaKhoiDiem}" /> VNĐ</td>
                                    <td class="label">Giá hiện tại</td>
                                    <td class="value"><fmt:formatNumber pattern="###,###" value="${sp.giaHienTai}" /> VNĐ</td>
                                </tr>
                                <tr>
                                    <td class="label">Số lượt xem</td>
                                    <td class="value">${sp.soLuongXem}</td>
                                    <td class="label">Số lượt đặt giá</td>
                                    <td class="value">${sp.soLuongdaugia}</td>
                                </tr>
                            </table>
                        </div>
                    </div>   
                </c:forEach>
            </c:if>   
        </div>
    </div>
</div>


